package com.brightgenerous.niconama02.player;

import com.brightgenerous.niconama02.stage.Audience;
import com.brightgenerous.niconama02.stage.Moment;
import com.brightgenerous.niconama02.stage.Moment.Type;

/**
 * コンソールプレイヤー
 * 
 * @author brigen
 */
public class SimplePlayer implements Audience {

	/**
	 * [constructor]
	 */
	public SimplePlayer() {
	}

	/**
	 * 特定の瞬間の映像・音声情報を観る
	 *
	 * @param x_moment 特定の瞬間の映像・音声情報
	 */
	@Override
	public void watch(Moment x_moment) {

		Type type = x_moment.getType();

		if (type.equals(Type.BOTH) || type.equals(Type.SCENE)) {
			String scene = x_moment.getScene();
			String sound = x_moment.getSound();
			if ((scene != null) && !scene.equals("")) {
				if ((sound != null) && !sound.equals("")) {
					System.out.println("-----" + scene + "----- < " + sound + " >");
				} else {
					System.out.println("-----" + scene + "-----");
				}
			}
		}
		if (type.equals(Type.BOTH) || type.equals(Type.FACE)) {
			String name = x_moment.getName();
			String voice = x_moment.getVoice();
			if ((name != null) && !name.equals("")) {
				if ((voice != null) && !voice.equals("")) {
					System.out.println(name + " 「" + voice + "」");
				}
			}
		}
	}
}